Optimal. Leaf size=317 \[ -\frac {2 A \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a d}-\frac {2 C (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b^2 d}+\frac {2 \sqrt {a+b} (B-C) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 317, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4058, 3921, 3784, 3832, 4004} \[ -\frac {2 A \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a d}-\frac {2 C (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b^2 d}+\frac {2 \sqrt {a+b} (B-C) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3784
Rule 3832
Rule 3921
Rule 4004
Rule 4058
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx &=C \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx+\int \frac {A+(B-C) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b^2 d}+A \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx+(B-C) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b^2 d}+\frac {2 \sqrt {a+b} (B-C) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}-\frac {2 A \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 16.95, size = 758, normalized size = 2.39 \[ \frac {4 C \sin (c+d x) \cos (c+d x) (a \cos (c+d x)+b) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{b d \sqrt {a+b \sec (c+d x)} (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}-\frac {4 \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \sqrt {a \cos (c+d x)+b} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (b (A-B-C) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+b}{a+b}} F\left (\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )-2 A b \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+b}{a+b}} \Pi \left (-1;\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )-2 A b \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+b}{a+b}} \Pi \left (-1;\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )+C (a+b) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+b}{a+b}} E\left (\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )+a C \tan ^5\left (\frac {1}{2} (c+d x)\right )-2 a C \tan ^3\left (\frac {1}{2} (c+d x)\right )+a C \tan \left (\frac {1}{2} (c+d x)\right )-b C \tan ^5\left (\frac {1}{2} (c+d x)\right )+b C \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right )^{3/2} \sec ^{\frac {3}{2}}(c+d x) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+b}{\tan ^2\left (\frac {1}{2} (c+d x)\right )+1}} \sqrt {a+b \sec (c+d x)} (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 27.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{\sqrt {b \sec \left (d x + c\right ) + a}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{\sqrt {b \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.46, size = 1193, normalized size = 3.76 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{\sqrt {b \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________